#!/usr/bin/env python
# -*- coding:utf-8 -*-
__author__ = 'walkingsky'

# 股票行业分类数据
BOARDS_HASH = [{'index':0,'code':'BK0437','name':'煤炭行业'},{'index':1,'code':'BK0447','name':'互联网服务'},
                {'index':2,'code':'BK0479','name':'钢铁行业'},{'index':3,'code':'BK0451','name':'房地产开发'},
                {'index':4,'code':'BK0424','name':'水泥建材'},{'index':5,'code':'BK0425','name':'工程建设'},
                {'index':6,'code':'BK0420','name':'航空机场'},{'index':7,'code':'BK0737','name':'软件开发'},
                {'index':8,'code':'BK0725','name':'装修装饰'},{'index':9,'code':'BK0539','name':'综合行业'},
                {'index':10,'code':'BK1045','name':'房地产服务'},{'index':11,'code':'BK0450','name':'航运港口'},
                {'index':12,'code':'BK0736','name':'通信服务'},{'index':13,'code':'BK1046','name':'游戏'},
                {'index':14,'code':'BK0726','name':'工程咨询服务'},{'index':15,'code':'BK0448','name':'通信设备'},
                {'index':16,'code':'BK1041','name':'医疗器械'},{'index':17,'code':'BK0477','name':'酿酒行业'},
                {'index':18,'code':'BK0735','name':'计算机设备'},{'index':19,'code':'BK0421','name':'铁路公路'},
                {'index':20,'code':'BK1016','name':'汽车服务'},{'index':21,'code':'BK0475','name':'银行'},
                {'index':22,'code':'BK0465','name':'化学制药'},{'index':23,'code':'BK0422','name':'物流行业'},
                {'index':24,'code':'BK0429','name':'交运设备'},{'index':25,'code':'BK0476','name':'装修建材'},
                {'index':26,'code':'BK0433','name':'农牧饲渔'},{'index':27,'code':'BK1019','name':'化学原料'},
                {'index':28,'code':'BK0727','name':'医疗服务'},{'index':29,'code':'BK0474','name':'保险'},
                {'index':30,'code':'BK0730','name':'农药兽药'},{'index':31,'code':'BK1040','name':'中药'},
                {'index':32,'code':'BK1044','name':'生物制品'},{'index':33,'code':'BK0464','name':'石油行业'},
                {'index':34,'code':'BK1020','name':'非金属材料'},{'index':35,'code':'BK0471','name':'化纤行业'},
                {'index':36,'code':'BK0485','name':'旅游酒店'},{'index':37,'code':'BK0484','name':'贸易行业'},
                {'index':38,'code':'BK0436','name':'纺织服装'},{'index':39,'code':'BK1042','name':'医药商业'},
                {'index':40,'code':'BK0473','name':'证券'},{'index':41,'code':'BK0482','name':'商业百货'},
                {'index':42,'code':'BK0738','name':'多元金融'},{'index':43,'code':'BK1035','name':'美容护理'},
                {'index':44,'code':'BK0733','name':'包装材料'},{'index':45,'code':'BK0470','name':'造纸印刷'},
                {'index':46,'code':'BK0740','name':'教育'},{'index':47,'code':'BK1037','name':'消费电子'},
                {'index':48,'code':'BK0478','name':'有色金属'},{'index':49,'code':'BK1028','name':'燃气'},
                {'index':50,'code':'BK1038','name':'光学光电子'},{'index':51,'code':'BK0456','name':'家电行业'},
                {'index':52,'code':'BK0428','name':'电力行业'},{'index':53,'code':'BK0486','name':'文化传媒'},
                {'index':54,'code':'BK1029','name':'汽车整车'},{'index':55,'code':'BK0739','name':'工程机械'},
                {'index':56,'code':'BK0910','name':'专用设备'},{'index':57,'code':'BK0546','name':'玻璃玻纤'},
                {'index':58,'code':'BK0728','name':'环保行业'},{'index':59,'code':'BK1027','name':'小金属'},
                {'index':60,'code':'BK0438','name':'食品饮料'},{'index':61,'code':'BK0457','name':'电网设备'},
                {'index':62,'code':'BK1018','name':'橡胶制品'},{'index':63,'code':'BK0454','name':'塑料制品'},
                {'index':64,'code':'BK0538','name':'化学制品'},{'index':65,'code':'BK0427','name':'公用事业'},
                {'index':66,'code':'BK0481','name':'汽车零部件'},{'index':67,'code':'BK1039','name':'电子化学品'},
                {'index':68,'code':'BK0440','name':'家用轻工'},{'index':69,'code':'BK0459','name':'电子元件'},
                {'index':70,'code':'BK0545','name':'通用设备'},{'index':71,'code':'BK1015','name':'能源金属'},
                {'index':72,'code':'BK1034','name':'电源设备'},{'index':73,'code':'BK1017','name':'采掘行业'},
                {'index':74,'code':'BK0458','name':'仪器仪表'},{'index':75,'code':'BK1032','name':'风电设备'},
                {'index':76,'code':'BK1043','name':'专业服务'},{'index':77,'code':'BK1030','name':'电机'},
                {'index':78,'code':'BK0729','name':'船舶制造'},{'index':79,'code':'BK0480','name':'航天航空'},
                {'index':80,'code':'BK1036','name':'半导体'},{'index':81,'code':'BK0731','name':'化肥行业'},
                {'index':82,'code':'BK1031','name':'光伏设备'},{'index':83,'code':'BK0732','name':'贵金属'},
                {'index':84,'code':'BK0734','name':'珠宝首饰'},{'index':85,'code':'BK1033','name':'电池'}]

# 股票数据列名称
COL_NAME = ['涨跌幅','主力净流入','小单净流入','中单净流入','大单净流入','超大单净流入',
            '主力净流入占比','小单流入净占比','中单流入净占比','大单流入净占比',
            '超大单流入净占比','收盘价']

# 基金数据列名称(场外基金)
FUND_COL_NAMES = [
    "基金代码", "基金名称", "英文缩写", "日期", "单位净值", "累计净值", "日增长率",
    "近1周", "近1月", "近3月", "近6月", "近1年", "近2年", "近3年", "今年以来",
    "成立来", "成立日期", "是否可购买", "自定义",  "未知1", 
    "手续费", "未知2", "未知3", "未知4", "未知5", 
]
# 基金数据列名称(场内基金)  把日增长率放在一个未知的空位上，用来兼容代码
FUND_COL_NAMES_ETF = [
    "基金代码", "基金名称", "英文缩写", "日期", "单位净值", "累计净值",
    "近1周", "近1月", "近3月", "近6月", "近1年", "近2年", "近3年", "今年以来",
    "成立来", "成立日期", "日增长率", "未知2", "未知3", "未知4", "未知5",
    "基金类型"
]

# 需要打印的基金数据列
FUND_PRINT_NAMES = [
    "基金代码", "基金名称",  "日增长率",
    "近1周", "近1月", "近3月", "近6月", "近1年", "近2年", "近3年", "今年以来",
    "成立来" 
]

# 要计算统计的数据列
COLUMNS_TO_ANALYZE = ["日增长率","近1周", "近1月", "近3月", "近6月", "近1年"]
# 要计算统计的数据列对应的天数
COLUMNS_TO_ANALYZE_DAYS = [1, 7, 30, 90, 180, 365]

#基金类型
FUND_KINDS = ['all','gp','zs','hh','zq','qdii','fof']

#基金累计收益走势数据的name类型
FUND_LJSYLZS_NAME = ['同类平均','沪深300' ,'中证500','上证指数','深证指数','中小板指','创业板指']

#缓存目录
FUND_CACHE_FILE_PATH = './temp_data/基金数据缓存/'

# 可对比的指数类型 沪深300 ，中证500，上证指数，深证指数，中小板指，创业板指
FUND_INDEXCODE_ARR = {'000300':'沪深300','000905':'中证500','000001':'上证指数',
                      '399001':'深证指数','399005':'中小板指','012981':'创业板指'}
# 时长类型    1个月，3个月，6个月，1年，3年，5年，今年以来，成立以来  
FUND_DURATION_TYPE_ARR = {'m':{'name':'1个月','value':30},   
                          'q':{'name':'3个月','value':90},     
                          'hy':{'name':'6个月','value':180},
                          'y':{'name':'1年','value':365},    
                          'try':{'name':'3年','value':365*3},   
                          'fiy':{'name':'5年','value':365*5},
                          'sy':{'name':'今年以来'},  
                          'se':{'name':'成立以来'}}